home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI502.ASC < prev    next >
Text File  |  1992-08-12  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                NUMBER  :  502
  9.   VERSION  :  1 & 2
  10.        OS  :  DOS
  11.      DATE  :  August 12, 1992                          PAGE  :  1/2
  12.  
  13.     TITLE  :  ONE-TO-MANY RELATIONSHIP IN A MULTI-ENTRY FORM
  14.  
  15.  
  16.  
  17.  
  18.   It is possible to  have  a  One-to-Many  relationship in a Multi-
  19.   Entry operation without having to duplicate information. Creating
  20.   multiple fields for this presents many problems of  its  own, and
  21.   is generally not the preferred method.  However, you can  use the
  22.   following information to create a One-to-Many  relationship  in a
  23.   Multi-Entry Form.
  24.  
  25.   Set up a TRANSACTION  file  (the one that will contain the tasks)
  26.   so that a single record contains a single  task.    Create  a JOB
  27.   file, which  must  be  keyed.    Set  up your Multi-Entry Form as
  28.   discussed on pages 148 through 152 of the User's Guide.
  29.  
  30.   The  trick  to  this method is  the  duplication  of  the  parent
  31.   information (your JOB information) automatically.   If  you enter
  32.   duplicate records  that will be Multi-Entered into a keyed table,
  33.   only one of the duplicates will be posted into  the  keyed  file,
  34.   the rest bounce  off.    Of  course, all of the information going
  35.   into the TRANSACTION file will arrive properly.
  36.  
  37.   There  are  two  methods to duplicating the  information  in  the
  38.   parent part of the Multi-Entry screen:
  39.  
  40.      1.  If you are doing your  Multi-Entry in a script, you should
  41.          use WAIT RECORD during  entry.   You need to have an UNTIL
  42.          key defined to  duplicate  the parent information in a new
  43.          record  and  another  defined  to  advance  to   the  next
  44.          completely new record.  A third key should  be  defined as
  45.          the quit entering key.   For example, the following can be
  46.          used for editing keystrokes:
  47.  
  48.              o  [F3] for the duplicate parent key.
  49.  
  50.              o  [F4] as the entirely new record key.
  51.  
  52.              o  [F2] for ending edit.
  53.  
  54.          On [F3] use  CopyToArray  to grab the current record, DOWN
  55.          to go to a new blank record, then use a FOR..NEXT  loop to
  56.          load the fields of the parent record from the array. Then,
  57.          return to your WAIT RECORD.  On a [F4] simply use DOWN and
  58.          on [F2] Do_It.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                NUMBER  :  502
  75.   VERSION  :  1 & 2
  76.        OS  :  DOS
  77.      DATE  :  August 12, 1992                          PAGE  :  2/2
  78.  
  79.     TITLE  :  ONE-TO-MANY RELATIONSHIP IN A MULTI-ENTRY FORM
  80.  
  81.  
  82.  
  83.  
  84.      2.  If  you  are doing Multi-Entry  interactively,  without  a
  85.          script,  there  is  an  easy  way to do  the  duplication.
  86.          Simply follow these steps:
  87.  
  88.             a.  While you are in  the  Multi-Entry  mode, type in a
  89.                 complete record.
  90.  
  91.             b.  Move to a blank record.
  92.  
  93.             c.  Press [ALT-F3] to begin an Instant Script Record.
  94.  
  95.             d.  Move to the first field  on your form that needs to
  96.                 be duplicated.
  97.  
  98.             e.  Press [CTRL-D] (the ditto key).  This will copy the
  99.                 data  from  the  preceding  record into the current
  100.                 record.
  101.  
  102.             f.  Move to the next record and press [CTRL-D].
  103.  
  104.          Continue this until all the fields from the "parent" table
  105.          have been duplicated.  Press  [ALT-F3]  again  to  end the
  106.          Instant Script Record.   You  have  now created a "Script"
  107.          that will copy the information for you.
  108.  
  109.   DISCLAIMER: You  have the right to use this technical information
  110.   subject to the terms  of  the  No-Nonsense License Statement that
  111.   you received with  the  Borland product to which this information
  112.   pertains.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.